package router

import (
	"longmen/server/internal/api"

	"github.com/labstack/echo/v4"
)

func initLiveRoute(group *echo.Group, base api.Controller, authFunc echo.MiddlewareFunc) {
	group.POST("/live/checkIsMgr", base.CheckIsMgr, authFunc) //检测是否是管理员
	//groupLive.POST("/getLiveInfo", base.GetLiveInfo)          //直播基础信息
	group.POST("/live/getCategory", base.GetCategory)         //直播大分类
	group.POST("/live/getBaseCategory", base.GetBaseCategory) //直播小分类
	//groupLive.POST("/setRoomMgr", base.SetRoomMgr, authFunc)  //设置房管
	group.POST("/live/getLiveList", base.GetLiveList)                     //直播列表
	group.POST("/live/list", base.LiveListPagination)                     //直播列表
	group.POST("/live/getMatchLiveList", base.GetMatchLiveList, authFunc) //根据赛事ID查询主播列表
	group.POST("/live/getAppLiveList", base.GetLiveList)                  //直播列表 移动端
	group.POST("/live/editLive", base.EditLive, authFunc)                 //修改直播
	group.POST("/live/startLive", base.StartLive, authFunc)               //开启直播
	group.POST("/live/endLive", base.EndLive, authFunc)                   //结束直播
	group.POST("/live/liveMenus", base.LiveMenus)                         //直播页菜单
	//groupLive.POST("/getStartLiveParams", base.GetStartLiveParams, authFunc)
	//groupLive.POST("/getListByCategory", base.GetListByCategory)
	group.POST("/live/getLivePageData", base.GetLivePageData, authFunc)
	group.POST("/live/getStreamInfo", base.GetStreamInfo, authFunc)
	group.POST("/live/getContributeRank", base.GetContributeRank) //直播贡献排行
	group.POST("/live/hotLive", base.HotLive)                     //移动端搜索页下热门直播列表
	group.POST("/live/callback", base.LiveCallback)               //直播回调
	group.POST("/live/callRecordBack", base.LiveRecordCall)       //直播记录回调

	//groupLive.POST("/getMatchList", base.GetMatchList, authFunc)
	//groupLive.POST("/config", base.LiveConfig)     // 直播配置
	group.POST("/live/visit_record", base.LiveVisitRecord, authFunc)      // 记录直播间访问记录
	group.POST("/live/visit_list", base.LiveVisitList, authFunc)          // 直播间访问记录列表
	group.POST("/live/visit_clean", base.LiveVisitClean, authFunc)        // 清除直播间访问记录
	group.POST("/live/official_live", base.OfficialLiveRoom)              //官方直播间
	group.POST("/live/user_backpack", base.GetUserBackpack, authFunc)     //用户背包
	group.POST("/live/user_set_backpack", base.SetUserBackpack, authFunc) //背包道具选择，最多三个
	group.POST("/live/useBackPackProps", base.UseBackPackProps, authFunc) //使用限时道具
	//groupLive.POST("/live_stat", base.AnchorLiveStatTest)//测试主播收益统计

	// 主播中心数据统计
	group.POST("/live/live_stat", base.AnchorLiveStat, authFunc)
	group.POST("/live/live_history", base.LiveHistory, authFunc)
	group.POST("/live/live_visitor", base.LiveVisitor, authFunc)

	// 达人榜
	group.POST("/live/top_user", base.TopUser)
	group.POST("/live/top_user_desc", base.TopUserDesc)

	//工会分成测试
	group.POST("/live/guild_share_test", base.GuildShareTest)
	//group.POST("/models_live/chat_test", base.ChatTest)

	group.POST("/live/getLiveSeoList", base.GetLiveSeoList)

	// 聊天室配置
	group.POST("/live/chat_config", base.ChatConfig)

	// 直播间入场扣票
	group.POST("/live/ticket", base.Ticket, authFunc)
	// 发观看券
	group.POST("/live/provide_ticket", base.ProvideTicket, authFunc)
	// 观看卷列表
	group.POST("/live/ticket_list", base.TicketList, authFunc)

	// 直播商城
	group.POST("/live/store", base.LiveStore)
	group.POST("/live/store_order", base.LiveStoreOrder, authFunc)
	group.POST("/live/store_order_list", base.LiveStoreOrderList, authFunc)

	group.POST("/gift/getGiftList", base.GetGiftList)
	group.POST("/gift/getGiftListNew", base.GetGiftListNew, authFunc)

	// 主播预约，直播计划
	group.POST("/live/anchor_plan_create", base.AnchorLivePlanCreate, authFunc)
	group.POST("/live/anchor_plan", base.AnchorLivePlan)
	group.POST("/live/anchor_plan_cancel", base.AnchorLivePlanCancel, authFunc)
	group.POST("/live/by_anchor_plan", base.ByAnchorLivePlan, authFunc)
	group.POST("/live/plan_start_live", base.PlanStartLive, authFunc)

	group.POST("/live/activity", base.Activity)

	// 直播预告
	group.POST("/live/preview", base.Preview)

	// 主播详情
	group.POST("/live/anchor_detail", base.AnchorDetail, authFunc)
	group.POST("/live/anchor_replay", base.AnchorReplay)

	// 6t体育对接
	group.POST("/live/list_6t", base.LiveList6t)
	group.POST("/live/detail_6t", base.LiveDetail6t)
	group.POST("/live/all_anchor_6t", base.AllAnchor6T)
}
